<template>
  <h2>root</h2>
  <h3>msg:{{msg}}</h3>
  <button @click="msg += '==='">update</button>
  <child :msg="msg" msg2="真香" @xxx="xxx"></child>
</template>
<script lang="ts">
import { defineComponent, ref } from 'vue'
import Child from './components/Child.vue'
export default defineComponent({
  name: 'App',
  components: {
    Child
  },
  setup () {
    const msg = ref('what are you no sha lei')
    function xxx (txt: string) {
      msg.value = msg.value + txt
    }
    return {
      msg,
      xxx
    }
  }
})
</script>
